#ifndef ObstacleAvoidanceActionGroup_H_INCLUDED
#define ObstacleAvoidanceActionGroup_H_INCLUDED

#include <Aria.h>
#include "AvoidObstacleAction.h"
#include "GoStraightAction.h"

class ObstacleAvoidanceActionGroup: public ArActionGroup {

private:
	ArRobot* robot;
	AvoidObstacleAction* avoid;
	GoStraightAction* advance;
	int initialDirection;
	bool startRealignment;
	bool emergencyStop;

public:
	ObstacleAvoidanceActionGroup(ArRobot* robot, int maxVelocity, int rotVel,
			uint16_t distanceToRealign, double turningTime);
	~ObstacleAvoidanceActionGroup();
	void start(int direction, uint16_t distanceToTravel, double turningTime);
	bool hasCompletedAvoidance();
};

#endif
